﻿using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Collections.ObjectModel;
using System.Collections.Specialized;
using System.Diagnostics;

namespace zoo
{
    [TestClass]
    public class UnitTest2
    {
        [TestMethod]
        public void TestMethod1()
        {
        c.CollectionChanged += this.OnCollectionChanged;
        c.Add(0);
        }

        private void OnCollectionChanged(object sender, NotifyCollectionChangedEventArgs ev) {
        e = ev;
        Debug.WriteLine(e.Action);
        Debug.WriteLine(e.NewStartingIndex);
        Debug.WriteLine(e.NewItems);
        Debug.WriteLine(e.OldStartingIndex);
        Debug.WriteLine(e.OldItems);
        }

        private NotifyCollectionChangedEventArgs e;
        private ObservableCollection<int> c = new ObservableCollection<int>();
    }
}
